Skip to content

hook-docker: bracket IPv6 hosts in dockerd syslog log driver URL#328

Merged
jacobweinstock merged 1 commit into
tinkerbell:mainfrom
rahulbabu95:fix/hook-docker-ipv6-syslog-bracket
Jul 16, 2026
Merged

hook-docker: bracket IPv6 hosts in dockerd syslog log driver URL#328
jacobweinstock merged 1 commit into
tinkerbell:mainfrom
rahulbabu95:fix/hook-docker-ipv6-syslog-bracket

Conversation

@rahulbabu95

Copy link
Copy Markdown
Contributor

Bare IPv6 addresses passed via the syslog_host= kernel cmdline were not bracketed in the dockerd syslog log driver URL, producing a malformed value that dockerd cannot parse. Use net.JoinHostPort so IPv6 is bracketed correctly (e.g. udp://[fd00:80:66::1]:514); IPv4 and hostname inputs are unchanged.

Also skip configuring the syslog log driver when the syslog host is empty.

Description

Fixes: #

How Has This Been Tested?

When syslod_host is set to ipv6 address like syslog_host=fd00:80:66::1,
/etc/docker/daemon.json
{
"debug": true,
"log-driver": "syslog",
"log-opts": {
"syslog-address": "udp://fd00:80:66::1:514"
}
}
dockerd crashes with:

error starting up Docker exit status 1 
will retry in 10 seconds

After the fix:

{
"debug": true,
"log-driver": "syslog",
"log-opts": {
"syslog-address": "udp://[fd00:80:66::1]:514"
}
}
dockerd is able to initialize properly.

How are existing users impacted? What migration steps/scripts do we need?

Checklist:

I have:

  • updated the documentation and/or roadmap (if required)
  • added unit or e2e tests
  • provided instructions on how to upgrade

@rahulbabu95
rahulbabu95 force-pushed the fix/hook-docker-ipv6-syslog-bracket branch from f1fbc27 to 8dfd012 Compare July 8, 2026 00:45
Bare IPv6 addresses passed via the `syslog_host=` kernel cmdline
were not bracketed in the dockerd syslog log driver URL, producing
a malformed value that dockerd cannot parse. Use net.JoinHostPort
so IPv6 is bracketed correctly (e.g. `udp://[fd00:80:66::1]:514`);
IPv4 and hostname inputs are unchanged.

Also skip configuring the syslog log driver when the syslog host
is empty.

Signed-off-by: Rahul Ganesh <rahulbabu95@gmail.com>
Signed-off-by: Rahul <rahulbabu95@gmail.com>
@rahulbabu95
rahulbabu95 force-pushed the fix/hook-docker-ipv6-syslog-bracket branch from 8dfd012 to c1eda74 Compare July 8, 2026 00:47
@jacobweinstock jacobweinstock added the ready-to-merge Signal to Mergify to merge the PR. label Jul 16, 2026
@jacobweinstock
jacobweinstock requested a review from Copilot July 16, 2026 22:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@jacobweinstock
jacobweinstock requested a review from Copilot July 16, 2026 22:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@jacobweinstock
jacobweinstock merged commit 47a9d42 into tinkerbell:main Jul 16, 2026
21 of 23 checks passed
@rahulbabu95
rahulbabu95 deleted the fix/hook-docker-ipv6-syslog-bracket branch July 16, 2026 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Signal to Mergify to merge the PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants